using System;
using System.ComponentModel;
using System.Collections.Generic;

using Castle.ActiveRecord;

/// <summary>
/// Business entity class generated from SellDetail
/// </summary>
/// <remarks>
/// Created by: huanhvhd
/// Created date: [2011-04-23]
/// </remarks>
namespace TVN.ShopMan.ActiveModels
{
	[ActiveRecord("SellDetail")]
	public partial class SellDetail : ActiveRecordBase<SellDetail>
	{
		#region Properties
		
        /// <summary>
        /// All properties
        /// </summary>
		public class Properties
		{
			public const string Id = "Id";
			public const string Quantity = "Quantity";
			public const string Price = "Price";
			public const string Product = "Product";
			public const string OrderSummary = "OrderSummary";
		}

		#endregion

		#region Private fields

		private int _id;
		private System.Decimal _quantity;
		private System.Decimal _price;
		private Product _productId;
		private OrderSummary _orderSummaryId;


		#endregion

		#region Constructors

		public SellDetail()
		{
		}

		#endregion

		#region Properties

		[PrimaryKey("Id", Access = PropertyAccess.NosetterLowercaseUnderscore)]
		public int Id
		{
			get { return _id; }
		}

		[Property("Quantity", NotNull = true)]
		public System.Decimal Quantity
		{
			get { return _quantity; }
			set { _quantity = value; }
		}

		[Property("Price", NotNull = true)]
		public System.Decimal Price
		{
			get { return _price; }
			set { _price = value; }
		}

		[BelongsTo("ProductId", Type = typeof(Product))]
		public Product Product
		{
			get { return _productId; }
			set { _productId = value; }
		}

		[BelongsTo("OrderSummaryId", Type = typeof(OrderSummary))]
		public OrderSummary OrderSummary
		{
			get { return _orderSummaryId; }
			set { _orderSummaryId = value; }
		}

		#endregion

	} }
